package com.cheney.demo.config;

import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.Input;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.SubscribableChannel;

/**
 * @author si.chen
 * @date 2021/4/25 15:06
 */
//将信道channel和exchange、topic绑定在一起
@EnableBinding({RocketMqConfig.MySource.class, RocketMqConfig.MySink.class})
public class RocketMqConfig {
    public interface MySink {
        @Input("input")
        SubscribableChannel input();

        @Input("input2")
        SubscribableChannel input2();

    }

    public interface MySource {

        @Output("output")
        MessageChannel output();

        @Output("output2")
        MessageChannel output2();

    }
}
